package org.cadet.util.model;

public class Constants {

    public static final String logfile = "logfile.log";
    public static final String websiteUrl = "http://localhost:8080/cadet";
    public static final String websiteCoreFolder = "/cadet";

    public static final class Captcha {
		public static final String VerifyUrl = "http://www.google.com/recaptcha/api/verify";
		public static final String publicKey = "6LeOsdcSAAAAAOHjj6wziFhEdSzLzxCQDjPbYPXo";
		public static final String privateKey = "6LeOsdcSAAAAAP3OwUfT_kxNXh5r9oJwvG3H4uSS";
    }

    public static final class DB {
		public static final String driver = "com.mysql.jdbc.Driver";
		public static final String dburl = "jdbc:mysql://localhost:3306/cadet";
		public static final String username = "root";
		public static final String password = "";
		public static boolean hasPassword = true;
    }

    public static final class sqlCommands{

	    public static final String AddClient = "INSERT INTO users (user_name, user_pass, user_registered, user_status, display_name) VALUES (?, ?, now(), ?, ?)";
		public static final String isClientAvailable = "SELECT COUNT(DISTINCT user_name) AS count FROM users WHERE user_name = ";
		public static final String retrivePasswordAdmin = "SELECT user_pass FROM users WHERE user_name = "; 	
		public static final String retrivePasswordClient = "SELECT user_pass FROM users WHERE user_name = ";
		public static final String VerifyClient = "UPDATE users SET user_status='Y' WHERE user_name = ?";
		public static final String CheckAdminVerification = "SELECT user_status FROM users WHERE user_name = ?";
		public static final String RetrieveUserId = "SELECT ID FROM users WHERE user_name = ?";
		public static final String RetrieveUsers = "SELECT * from users";
		public static final String RetrieveFollowedUsers = "SELECT * FROM `users` WHERE ID IN ";
		public static final String RetrieveUnfollowedUsers = "SELECT * FROM `users` WHERE ID NOT IN ";
		public static final String RetrieveFollowedUserIds = "SELECT `follow_user` FROM `user_followed` WHERE `current_user` = ?";
		public static final String followUser = "INSERT INTO `user_followed`(`current_user`, `follow_user`) VALUES (?, ?)";
		public static final String unfollowUser = "DELETE FROM `user_followed` WHERE `current_user`= ? AND `follow_user` = ?";
		public static final String UpdateProfileDetails = "UPDATE `users` SET `user_pass`= ? ,`display_name`= ? WHERE `user_name` = ?";
		public static final String RetrieveUserByUserID = "SELECT * FROM users WHERE ID = ?";
		public static final String RetrieveDisplayNameById = "SELECT display_name FROM users WHERE ID = ?"; 
		public static final String AddThought = "INSERT INTO posts(post_author, post_date, post_content, post_title) VALUES (?,now(),?,?)";
		public static final String UpdateThought = "UPDATE posts SET post_author = ?, LevelId = ?, Question = ?, OptA = ?, OptB = ?, OptC = ?, OptD = ?, CorrectAnswer = ? WHERE QuestionId= ?";
		public static final String RemoveThought = "DELETE from posts WHERE ID = ?";
		public static final String RetrieveAllThought = "SELECT * FROM posts ORDER BY post_date DESC";
		public static final String RetrieveFollowedUserThought = "SELECT * FROM posts WHERE post_author IN ";
		public static final String RetrieveAuthorwiseThought = "SELECT * FROM posts WHERE post_author = ? ORDER BY post_date DESC";
		public static final String RetrieveThoughtByThoughtID = "SELECT * FROM posts WHERE ID = ?";
		public static final String CheckClientVerification = "SELECT user_status FROM users WHERE user_name = ?";	
    }
	
	public static final class email{
		public static final String SMTP_HOST_NAME = "smtp.gmail.com";
		public static final String EmailUsername = "nagmani4metisme@gmail.com";
		public static final String EmailPassword = "metisme.com";
		public static final Integer SMTP_PORT = 465;
		public static final String SMTP_SSL = "true";
		public static final String SMTP_AUTH = "true";
		public static final String EmailMessage = "Please Click following link to verify your email address " + websiteUrl + "/verifyEmail?";
		public static final String EmailSubject = "[EMAIL Verification] CO-THINKER";
		public static final String EmailRegex = "^(.+)@(.+)$";
		public static final String ForgotEmailMessage = "Please Click following link to verify your email address " + websiteUrl + "/ForgotPassword?";
		
    }
	
}
